home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
fortran
/
bcf7713b.zip
/
ENGLISH.TXT
< prev
next >
Wrap
Text File
|
1992-12-01
|
13KB
|
358 lines
╔═══════════════════════════════════════════════════╗
║ BC-FORTRAN77 Vers 1.3b ║
║ copyright: Andre Koestli ║
║ 1990 Martin Luther Str.63 ║
║ D700 Stuttgart 50 ║
╠═══════════════════════════════════════════════════╣
║Version "b" of BC-FORTRAN77, comprised of the 5 ║
║files described later, is programmed entirely by ║
║me. I permit free use of version "b" for non- ║
║commercial applications, with all rights remaining ║
║with me, in particular the sale of version b ║
║together with other products is not allowed. Every║
║copy must include this text unchanged. Use for ║
║military purposes or corresponding research is ║
║forbidden! ║
║July 1990 A. Koestli║
╚═══════════════════════════════════════════════════╝
BC-FORTRAN77 Version b consists of a compiler, linker, module library and a
resident run-time system, which also contains a simple debugger. This version
runs on an MS-DOS computer with 640kB RAM. A hard disk is not required. A
compiler for a programming course should become available as a result of this.
Then will come the corresponding compiler for the Atari ST and Amiga.
I will still answer inquiries for sending another or newer version if 20
Deutchmarks (currency or check) to cover expenses for diskette, mailer,
postage and time is included. I only send 3 1/2" diskettes.
BC-FORTRAN77 version b consists of the following parts:
LIES.TXT This text
BCF.EXE Compiler
BCL.EXE Linker
BCRTSY.EXE Resident run-time system
LIB.B Library of standard functions
When a copy is made all of the parts mentioned above must be included.
Installation.
-------------
BEFORE the compiler, linker or program is started, the resident run-time
system MUST be loaded. For this, just run the program BCRTSY.EXE. If you use
BC-FORTRAN77 regularly, place BCRTSY.EXE in your AUTOEXEC.BAT file.
Copy the *.EXE files into a directory contained in the PATH and the LIB.B file
in an APPEND directory (see the MS-DOS commands PATH and APPEND).
Compiler
--------
The compiler is started by
BCF [-Option...] File...
If File does not contain a period, a .F will be appended. The object file
will be placed in FILE.B.
Example:
BCF -D TEST.F
Compile TEST.F with the debug option into TEST.B
BCF TEST SUB
Compile TEST.F into TEST.B and SUB.F into SUB.B
BCF TEST.X
Compile TEST.X into TEST.B
Compiler Options
----------------
You can use /Option instead of -Option.
-D Debug: equivalent to -BVL
-B deBugcode: implies -H and also produces debugger calls for
examination of field borders and substrings.
-H parcHeck: produces code for examination of parameter lists
and checks of stack overruns
-V Varlist: List of variables for debugger
-L Lineslist: Line number list for debugger
-U Uppercase: Changes lower-case into upper case characters (even
in character constants and formats). Without this
option xy, XY, Xy and xY are four different
variables!
-F Free input: Source program is not in FORTRAN format. Non-standard!
-P Protocol: registry of the compiled lines.
-S Short protocol: One line per module with the size of the stack
frame and code in bytes.
-O One: produces one output file with name of the first
input file.
Language Summary
----------------
BCC-FORTRAN77 compiles the complete standard from ANSI/ISO. The
language standard will, however, be violated by several peculiarities
(mostly these will be called extensions). I strongly recommend that
these extensions not be used, since they are non-standard and hence
not precisely defined.
The most important of the "peculiarities" are:
INTEGER*1 8 bit INTEGER
INTEGER*2 16 bit INTEGER
INTEGER*4 like INTEGER
LOGICAL*1 8 bit LOGICAL
LOGICAL*2 16 bit LOGICAL
LOGICAL*4 like LOGICAL
IMPLICIT NONE turns off implicit type definitions
COMMON /%adr/ Absolute COMMON, adr is a constant or simple
variable which specifies the segment address
EQUIVALENCE() allows character and other types to be mixed in COMMON
Recursive subroutine calls
Names with a maximum of 8 characters (the standard is 6).
The most important restrictions are:
32kB Code+SAVE/DATA for subroutines
32kB local data for subroutines (stack frame) 32kB for COMMON
(actually 64kB, but the address of the last field must be <32k)
700 subroutines per file 500 different COMMON blocks per file
Less important are a series of restrictions where very large
subroutines give rise to error messages without surpassing the 32kB
code limit.
Linker
------
The Linker is started by
BCL [-Options...] File...
If File doesn't contain a period, a .B will be appended. The
executable file will be created with the name of the first file but
with .EXE substituted for .B. It must also search the LIB.B file in
order to link the standard functions and I/O routines.
Example:
BCL -S16 TEST SUB LIB
or
BCL -S16 TEST.B SUB.B LIB.B
links the files TEST.B and SUB.B into the runnable program TEST.EXE with a
stack size of 16kB.
Linker Options
--------------
-Sn Stack size will be set to n kB (max 64). Without this option
a 64kB stack will be used. All local variables and fields for
a subroutine will be placed on the stack.
-O Optimize: subroutines which are not called are omitted.
-P Protocol: List the COMMON blocks and program modules
Restrictions
------------
The most important restriction lies in the size of RAM: the size of
the program (without COMMON and stack) can only be as large as the
largest free memory block after loading BCL. On the other hand, it is
possible to produce a program with large COMMONs and stack which will
not run in the available memory.
The number of subroutines is limited to 3000, the number of COMMON
blocks to 1500. (This is a result of the ridiculous 640kB limit of
MS-DOS.)
Run Time System
---------------
The run time system BCRTSY.EXE contains the routines needed by a
FORTRAN77 program and must be made memory resident before any
FORTRAN77 programs are run.
BCRTSY contains:
Arithmetic routines:
32 bit INTEGER multiplication & division
REAL arithmetic
DOUBLE precision arithmetic
It uses the IEEE floating point format
REAL: 7 decimal places, 32 bit 1 bit sign, 8 bit exponent, 24
bit mantissa
DOUBLE PRECISION: 14 decimal places, 64 bit 1 bit sign, 11 bit
exponent, 52 bit mantissa
A math coprocessor is not supported. (an 80x87 version exists,
but I can't test it since I don't have the necessary
hardware.)
Character routines
Debugger:
A simple debugger for finding errors.
Also a run time error will give an error message and wait for a
command.
The debugger can also be activated by a key-stroke interrupting
the program's execution if the program was created with the B
option. The following keys are recognized by the debugger as
commands:
T (Traceback) Look back through the subroutine call stack and
find the next higher module with line number if the program
was compiled with the -L option.
U (Untrace) Cancel all trace back actions. This happens
automatically when the